package com.lxc.apigatewaysdk.config;

import com.lxc.apigatewaysdk.application.GatewaySDKApplication;
import com.lxc.apigatewaysdk.domain.service.GatewayCenterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author lxc18
 * @date 2024/12/24 11:42
 * @description GatewaySDKAutoConfig
 */
@Configuration
@EnableConfigurationProperties(GatewaySDKProperties.class)
public class GatewaySDKAutoConfig {

    private Logger logger = LoggerFactory.getLogger(GatewaySDKAutoConfig.class);
    //显式声明
    @Bean
    public GatewayCenterService gatewayCenterService() {
        return new GatewayCenterService();
    }

    @Bean
    public GatewaySDKApplication gatewaySDKApplication(GatewaySDKProperties properties, GatewayCenterService gatewayCenterService) {
        return new GatewaySDKApplication(properties,gatewayCenterService);
    }

}
